﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CarAppDto.Base;
using FluentValidation;

namespace CarAppDto.CarType.VehicleSeriesDtos
{
    public class ReqUpdateVehicleSeriesValidator : AbstractValidator<ReqUpdateVehicleSeries>
    {
        /// <summary>
        /// 校验规则写到校验类的构造方法中
        /// </summary>
        public ReqUpdateVehicleSeriesValidator()
        {
            RuleFor(x => x.Id).NotEmpty().Length(1, 36);
            RuleFor(x => x.BrandId).NotEmpty().Length(1, 36);
            RuleFor(x => x.Name).NotEmpty().Length(1, 128);
            RuleFor(x => x.Code).NotEmpty().Length(1, 20);
            RuleFor(x => x.CarSeriesModel).NotEmpty().Length(1, 50);
        }
    }
    public class ReqUpdateVehicleSeries : BaseUpdateModel
    {
        /// <summary>
        /// 所属品牌代码
        /// </summary>
        public string? BrandId { get; set; }

        /// <summary>
        /// 车系代码（车系ID）
        /// </summary>
        public string? Code { get; set; }

        /// <summary>
        /// 车系中文名称
        /// </summary>
        public string? Name { get; set; }

        /// <summary>
        /// 车系英文名称
        /// </summary>
        public string? EnglishName { get; set; }

        /// <summary>
        /// 车系型号
        /// </summary>
        public string? CarSeriesModel { get; set; }

        /// <summary>
        /// 销售区域Id
        /// </summary>
        public string? SaleAreaId { get; set; }

        /// <summary>
        /// 制造国Id
        /// </summary>
        public string? ManufacturingCountryId { get; set; }

        /// <summary>
        /// 年代代码
        /// </summary>
        public string? ModelYearCode { get; set; }


        /// <summary>
        ///目录号
        /// </summary>
        public string? CatalogNo { get; set; }

        /// <summary>
        ///车系简码
        /// </summary>
        public string? VehicleSeriesBrevityCoding { get; set; }


        /// <summary>
        /// 车系版本英文名称
        /// </summary>
        public string? VehicleSeriesVersionEnglishName { get; set; }

        /// <summary>
        /// 车系版本中文名称
        /// </summary>
        public string? VehicleSeriesVersionName { get; set; }

        /// <summary>
        /// 上市时间
        /// </summary>
        public DateTime? MarketingTime { get; set; }

        /// <summary>
        /// 停产时间
        /// </summary>
        public DateTime? DownTime { get; set; }


        /// <summary>
        /// 销售状态
        /// </summary>
        public int? SaleStatus { get; set; }

        /// <summary>
        /// 停销时间
        /// </summary>
        public DateTime? SaleDownTime { get; set; }

        /// <summary>
        /// 图片路径
        /// </summary>
        public string? Image { get; set; }

    }
}
